home *** CD-ROM | disk | FTP | other *** search
- //---------------------------------------------------------------------------
- #include <vcl\vcl.h>
- #pragma hdrstop
-
- #include "Hallo6x.h"
- //---------------------------------------------------------------------------
- #pragma resource "*.dfm"
- TForm1 *Form1;
- char *Diagnose;
- char *Titel;
- bool Wahl[3];
- String Bereich[3];
-
- //---------------------------------------------------------------------------
- __fastcall TForm1::TForm1(TComponent* Owner)
- : TForm(Owner)
- {
- }
- //---------------------------------------------------------------------------
- void __fastcall TForm1::RadioGroup1Click(TObject *Sender)
- {
- switch (RadioGroup1->ItemIndex)
- {
- case 0:
- Diagnose = "Das ist ja toll!";
- break;
- case 1:
- Diagnose ="Das freut mich!";
- break;
- case 2:
- Diagnose ="Das geht ja noch!";
- break;
- case 3:
- Diagnose ="Das tut mir leid!";
- break;
- case 4:
- Diagnose ="Das ist ja schlimm!";
- break;
- case 5:
- Diagnose ="Wenn du meinst...";
- }
- }
- //---------------------------------------------------------------------------
- void __fastcall TForm1::Button1Click(TObject *Sender)
- {
- String Text = "Diagnose";
- for (int i=0; i<3; i++)
- if (Wahl[i]) Text = Text + Bereich[i];
- Titel = Text.c_str();
- Application->MessageBox (Diagnose, Titel, 4+64);
- }
- //---------------------------------------------------------------------------
- void __fastcall TForm1::FormCreate(TObject *Sender)
- {
- Bereich[0] = " fⁿr Seele ";
- Bereich[1] = " fⁿr Geist ";
- Bereich[2] = " fⁿr K÷rper ";
- for (int i=0; i<3; Wahl[i++] = false);
- }
- //---------------------------------------------------------------------------
- void __fastcall TForm1::CheckBox1Click(TObject *Sender)
- {
- Wahl[0] = CheckBox1->Checked;
- }
- //---------------------------------------------------------------------------
- void __fastcall TForm1::CheckBox2Click(TObject *Sender)
- {
- Wahl[1] = CheckBox2->Checked;
- }
- //---------------------------------------------------------------------------
- void __fastcall TForm1::CheckBox3Click(TObject *Sender)
- {
- Wahl[2] = CheckBox3->Checked;
- }
- //---------------------------------------------------------------------------
-